from django.shortcuts import render
from django.http import HttpResponse,HttpResponseRedirect
from django.urls import reverse
# Create your views here.

def add(request):
	a = request.GET.get('a',0)
	b = request.GET.get('b',0)
	c = int(a)+int(b)
	return HttpResponse(str(c))

def add2(request, int1=0, int2=0):
	c = int(int1)+int(int2)
	return HttpResponse(str(c))

def index(request):
	return render(request, 'home.html')

def old_add2_redirect(request,int1,int2):
	return HttpResponseRedirect( reverse('add2',args=(int1,int2)))
